#ifndef ARMY_DOM_DIVISION_H
#define ARMY_DOM_DIVISION_H

#include <QString>
#include <QList>
#include <QSharedData>
#include <QSharedDataPointer>
//===========================
#include "army_dom_units.h"


class PArmyDomDivisionData;

class ArmyDomDivision
{
public:
    ArmyDomDivision();
    ArmyDomDivision(armydom::DivisionType divisionType, const QString& name = QString());
    ArmyDomDivision(const ArmyDomDivision& other);
    ArmyDomDivision& operator=(const ArmyDomDivision& other);

    void assignTo( const ArmyDomDivision& divForAssign );

    // GET {
    QString getName();
    // }
    // SET: {
    void setDivisionName(const QString& divName);
    void setDivCommander(const ArmyDomCommander& divCommander);
    // }

protected:
    QSharedDataPointer<PArmyDomDivisionData> m_data;
};

class PArmyDomDivisionData : public QSharedData
{
public:
    PArmyDomDivisionData()
    {  }

    QString m_name;
    armydom::DivisionType m_divType;
    ArmyDomCommander m_divCommander;
    ArmyDomDivision m_assignTo;
    ArmyDomDivision m_baseAssigned;
    ArmyDomDivision m_subordinatedTo;
    QList<ArmyDomDivision> m_CommandsUnder;
};

#endif // ARMY_DOM_DIVISION_H
